
<HTML>
    <HEAD>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <!-- blueprint CSS framework -->
<!--        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />-->
        <!--[if lt IE 8]>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
        <![endif]-->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
<!--        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/main.css" />-->

<!--        <script src="js/jquery-1.7.1.min.js"></script>-->
        <?php Yii::app()->clientScript->registerCoreScript('jquery') ?>                
        <?php Yii::app()->getClientScript()->registerCoreScript('jquery.ui'); ?>

        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.layout-latest.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/debug.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/shortcuts.js"></script>
        
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/layout-default-latest.css" />
        <link rel="stylesheet" type="text/css" href="css/jquery.ui/start/jquery.ui.all.css" />
<!--        <link rel="stylesheet" type="text/css" href="css/jquery.ui/bgscstpc/jquery-ui-1.8.17.custom.css" />-->
<!--        <link rel="stylesheet" type="text/css" href="css/jquery.ui/bgscstpc/jquery-ui-1.8.17.custom.css" />-->
        <link rel="stylesheet" type="text/css" href="css/jquery.ui/start/jquery.ui.all.css" />

    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/default.css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/msie.css" /><![endif]-->
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/print.css" media="print" />


        <?php
//        Yii::app()->clientScript->registerCssFile(
//                Yii::app()->assetManager->publish(
//                        Yii::app()->basePath . '/vendors/jquery.ui/start/'
//                ) .
//                '/jquery.ui.all.css'
//        );
        ?>


        <STYLE>
            .ui-widget, .ui-widget-header { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; }
            .ui-layout-center { margin-top: 1em; }
            .ui-layout-center li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }

            /*            .ui-layout-toggler {
                            display: none !important;
                            width: 1px !important;
                        }            
            
                        .ui-layout-resizer {
                            background-color: #666 !important;
                            width: 1px !important;
                            margin: 0px !important;
                            padding: 0px !important;
                        }          
                        
                        .ui-layout-resizer-open{
                            width: 1px !important;
                            margin: 0px !important;
                            padding: 0px !important;
                            
                        }*/

            .ui-layout-pane{
                /*border: 1px groove #4297d7!important;*/
/*                border: 5px none #2E3368 !important;
                border: 5px solid #2E3368 !important;*/
                border: none;
                background-color: transparent;
            }
            .ui-layout-south{
                border: none!important;
                padding: 0!important;
                /*                padding: 0px!important;
                                margin: 0px!important;
                                display: block!important;
                                position: absolute!important;
                                overflow: auto!important;*/
            }
            .ui-layout-resizer-south {
                /*                background-color: green !important;*/
            }          
            .ui-layout-toggler{
                background-color: #2191c0 !important;
                /*                height: 1px!important;*/
            }          
            .ui-layout-resizer {
                background-color: #2191c0 !important;
                /*                height: 1px!important;*/
            }          
            .ui-layout-toggler-south {
                /*                display: none !important;*/
            }        
            .ui-layout-resizer-south-open{
                /*                display: none !important;                */
            }
            .ui-layout-toggler{
                margin: 0px!important;
                /*                padding: 0px!important;*/
            }
  
            .portlet
            {
                padding: 10px;
/*                width: 92%;*/
            }
            
            .portlet-title
            {
/*                font-size: 13px;
                font-weight: bold;
                padding: 0;
                margin: 0;*/
/*                color: #298dcd;
                color: #EEEEFF;*/
                font-weight: bolder;
                font-size: 15px;
                color: black;
            }
            
            .portlet-content ul{
                padding-right: 3px;
            }
            
/*            .portlet
            {
                padding: 10px;
                width: 92%;
            }

            .portlet-decoration
            {
                padding: 3px 8px;
                                background: #B7D6E7;
                border: 1px solid;
                border-left: 5px solid #641b63;
                background: #823681;
            }

            .portlet-title
            {
                font-size: 12px;
                font-weight: bold;
                padding: 0;
                margin: 0;
                color: #298dcd;
                color: #EEEEFF;
                font-weight: bolder;
                font-size: 15px;
            }

            .portlet-content
            {
                font-size:0.9em;
                margin: 0 0 15px 0;
                padding: 5px 8px;
                                background:#EFFDFF;
                border: 1px solid;
            }

            .portlet-content ul
            {
                list-style-image:none;
                list-style-position:outside;
                list-style-type:none;
                margin: 0;
                padding: 0;
            }

            .portlet-content li
            {
                padding: 2px 0 4px 0px;
            }*/

            .operations
            {
                list-style-type: none;
                margin: 0;
                padding: 0;
            }

            .operations li
            {
                padding-bottom: 2px;
            }

            .operations li a
            {
                font: bold 12px Arial;
                color: #0066A4;
                color: #823681;
                display: block;
                padding: 2px 0 2px 8px;
                line-height: 15px;
                text-decoration: none;
            }

            .operations li a:visited
            {
                color: #0066A4;
                color: #823681;
            }

            .operations li a:hover
            {
                background: #80CFFF;
                background: #823681;
                color: white;
            }
            

        </STYLE>

        <style type="text/css">
            html, body {
                /*                background:	#666;*/
/*                width:		100%;
                height:		100%;					
                padding:	0;
                margin:		0;
                overflow:	auto;  when page gets too small 
                background-color: #2E3368 !important;*/
                padding:	0;
                margin:		0;
                overflow:	auto; /* when page gets too small */

            }
            #container {
                /*                background:	#999;
                                height:		95%;
                                margin:		0 auto;
                                width:		100%;
                                max-width:	900px;
                                min-width:	700px;
                                _width:		700px;  min-width for IE6 

                                margin-top: 5px;
                                margin-bottom: 5px;
                                background: white;
                                border: 1px solid #121c28;*/
                border: medium none;
                height: 100%;
                margin: 0;
                padding: 0px !important;
                overflow: hidden;
                position: relative;
            }

            /*            .pane {
                            display:	none;  will appear when layout inits 
                            background:     #D5EADE;
                        }*/

        </style>

        <SCRIPT type="text/javascript">
            
            
            $(document).ready(function () {
                //                $('body').layout({ applyDefaultStyles: true });
                //                myLayout = $('body').layout({ applyDefaultStyles: true}); 
                myLayout = $('#container').layout(
                {
                    useStateCookie:false,

                    defaults:{
                        spacing_open:  0
                    }
//                    ,north: {
//                        //                          paneSelector: ".inner-north" ,
//                        //size: 30
//                    }
                }
            ); 
                myLayout.sizePane("south", 28);
                myLayout.sizePane("south", 59);
                myLayout.sizePane("north", "auto");
//                myLayout.sizePane("north", 32);
//                myLayout.sizePane("west", 210);
                
                $( "#mybutton" ).button({
                    icons: {
                        primary: "ui-icon-locked"
                    },
                    text: false
                });

$(window).resize(function(){
  $('#contentItem').css({
    position:'absolute',
    left: ($(window).width() - $('#contentItem').outerWidth())/2
//    top: ($(window).height() - $('#contentItem').outerHeight())/2
  });
});
 
// To initially run the function:
$(window).resize();


//                myLayout.toggle('north');
//                $("#contentItem").show();
//                $("#mainCont").show();
//                $('#contentBlock').animate({left:0,width:"100%",top:0,height: "100%"},"slow");
//                $("#container").show('fast', function(){});
                $("#container").fadeIn(2000);
                $("#UserLogin_username").focus();
//                $("#ui-layout-center-content").show();
                
//                  $("#contentBlock").hide();
                myLayout.sizePane("north", "auto");

            });
        </SCRIPT>
    </HEAD>
    <BODY>
        <div id="container" style="display:none;">
            <?php echo $content; ?>
        </div>
    </BODY>
</HTML>